package com.example.design;

import org.junit.Test;

import java.util.Objects;

public class T {
    private String name;
    private String sex;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        T t = (T) o;
        return Objects.equals(name, t.name) && Objects.equals(sex, t.sex);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, sex);
    }
}
